import React from "react";
import './Home.css'

class Page extends React.Component
{
    constructor()
    {
        super();
        this.state = {
            desc: ["首页", "商品", "个人"],
            index:0
        }
      
    }

    changeIndex(index)
    {
        this.setState = {
            index:index
        }
    }

    render()
    {
        let { index } = this.props;
        return (<div className="page">
            <h1>{ this.state.desc[index]}</h1>
            </div>)
    }
}

export default Page;